package com.ktjy.ch15.mapper;

import com.ktjy.ch15.entity.Crop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CropMapper {

    public Crop getByCropName(@Param("cropName") String cropName);

    public List<Crop> getPage(@Param("crop") Crop crop,
                                     @Param("pageBegin") Integer pageBegin,
                                     @Param("pageSize") Integer pageSize);

    public Integer count(@Param("crop") Crop crop);

    public int insert(Crop crop);

    public Crop getById(@Param("cropId") Long cropId);

    public int update(Crop crop);

    public int delete(@Param("id") Long id);
}
